<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>1. 电商管理后台 API 接口文档 | admin开发文档</title>
    <meta name="description" content="开发文档">
    <link rel="stylesheet" href="/docs/assets/style.b4946e2d.css">
    <link rel="modulepreload" href="/docs/assets/chunks/VPAlgoliaSearchBox.84aceb17.js">
    <link rel="modulepreload" href="/docs/assets/chunks/ui-custom.493418cf.js">
    <link rel="modulepreload" href="/docs/assets/app.db96d06c.js">
    <link rel="modulepreload" href="/docs/assets/笔记_API接口文档.md.709394bf.lean.js">
    
    <link rel="icon" type="image/svg+xml" href="/docs/logo.svg">
  <script>(()=>{const e=localStorage.getItem("vitepress-theme-appearance"),a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-6b5fd0a9><!--[--><!--]--><!--[--><span tabindex="-1" data-v-45f6ae50></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-45f6ae50> Skip to content </a><!--]--><!----><header class="VPNav" data-v-6b5fd0a9 data-v-0e356168><div class="VPNavBar has-sidebar" data-v-0e356168 data-v-8856f192><div class="container" data-v-8856f192><div class="VPNavBarTitle has-sidebar" data-v-8856f192 data-v-6a6f7ff6><a class="title" href="/docs/" data-v-6a6f7ff6><!--[--><img class="VPImage logo" src="/docs/logo.svg" data-v-73ae1788><!--]--><!--[-->Miyagi-jiye<!--]--></a></div><div class="content" data-v-8856f192><div class="VPNavBarSearch search" data-v-8856f192><div id="docsearch"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg class="DocSearch-Search-Icon" width="20" height="20" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key">Meta</kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-8856f192 data-v-a30758ee><span id="main-nav-aria-label" class="visually-hidden" data-v-a30758ee>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/指引/" data-v-a30758ee data-v-8fba5fa8 data-v-5704c677><!--[-->指引<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/docs/关于/" data-v-a30758ee data-v-8fba5fa8 data-v-5704c677><!--[-->关于<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/docs/笔记/" data-v-a30758ee data-v-8fba5fa8 data-v-5704c677><!--[-->笔记<!--]--><!----></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-a30758ee data-v-8dccea88><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-8dccea88><span class="text" data-v-8dccea88><!----> 分类 <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-8dccea88><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-8dccea88><div class="VPMenu" data-v-8dccea88 data-v-e73581a2><div class="items" data-v-e73581a2><!--[--><!--[--><div class="VPMenuGroup" data-v-e73581a2 data-v-4bc84c0d><p class="title" data-v-4bc84c0d>前端</p><!--[--><!--[--><div class="VPMenuLink" data-v-4bc84c0d data-v-06b18c43><a class="VPLink link" href="/docs/html/" data-v-06b18c43 data-v-5704c677><!--[-->html<!--]--><!----></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-4bc84c0d data-v-06b18c43><a class="VPLink link" href="/docs/css/" data-v-06b18c43 data-v-5704c677><!--[-->css<!--]--><!----></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-4bc84c0d data-v-06b18c43><a class="VPLink link" href="/docs/javascript/" data-v-06b18c43 data-v-5704c677><!--[-->javascript<!--]--><!----></a></div><!--]--><!--]--></div><!--]--><!--[--><div class="VPMenuGroup" data-v-e73581a2 data-v-4bc84c0d><p class="title" data-v-4bc84c0d>后端</p><!--[--><!--[--><div class="VPMenuLink" data-v-4bc84c0d data-v-06b18c43><a class="VPLink link" href="/docs/....html" data-v-06b18c43 data-v-5704c677><!--[-->数据库<!--]--><!----></a></div><!--]--><!--]--></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-8856f192 data-v-2ec6e3c4 data-v-8dccea88><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-8dccea88><span class="text" data-v-8dccea88><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="option-icon" data-v-8dccea88><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg>  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-8dccea88><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-8dccea88><div class="VPMenu" data-v-8dccea88 data-v-e73581a2><!----><!--[--><!--[--><div class="items" data-v-2ec6e3c4><p class="title" data-v-2ec6e3c4>简体中文</p><!--[--><div class="VPMenuLink" data-v-2ec6e3c4 data-v-06b18c43><a class="VPLink link" href="https://vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->English<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><div class="VPMenuLink" data-v-2ec6e3c4 data-v-06b18c43><a class="VPLink link" href="https://ja.vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->日本語<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><div class="VPMenuLink" data-v-2ec6e3c4 data-v-06b18c43><a class="VPLink link" href="https://es.vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->Español<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-8856f192 data-v-311055f2><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" aria-label="toggle dark mode" data-v-311055f2 data-v-781f9d1b data-v-1dda4c9c><span class="check" data-v-1dda4c9c><span class="icon" data-v-1dda4c9c><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-781f9d1b><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-781f9d1b><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-8856f192 data-v-0ae890f7 data-v-4dcbaf3a><!--[--><a class="VPSocialLink" href="https://github.com/" title="github" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg><span class="visually-hidden" data-v-48c45ef6>github</span></a><a class="VPSocialLink" href="..." title="twitter" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"></path></svg><span class="visually-hidden" data-v-48c45ef6>twitter</span></a><a class="VPSocialLink" href="..." title="discord" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"></path></svg><span class="visually-hidden" data-v-48c45ef6>discord</span></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-8856f192 data-v-0562f5c0 data-v-8dccea88><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-8dccea88><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-8dccea88><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-8dccea88><div class="VPMenu" data-v-8dccea88 data-v-e73581a2><!----><!--[--><!--[--><div class="group" data-v-0562f5c0><p class="trans-title" data-v-0562f5c0>简体中文</p><!--[--><div class="VPMenuLink" data-v-0562f5c0 data-v-06b18c43><a class="VPLink link" href="https://vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->English<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><div class="VPMenuLink" data-v-0562f5c0 data-v-06b18c43><a class="VPLink link" href="https://ja.vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->日本語<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><div class="VPMenuLink" data-v-0562f5c0 data-v-06b18c43><a class="VPLink link" href="https://es.vitejs.dev" target="_blank" rel="noopener noreferrer" data-v-06b18c43 data-v-5704c677><!--[-->Español<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-5704c677><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a></div><!--]--></div><div class="group" data-v-0562f5c0><div class="item appearance" data-v-0562f5c0><p class="label" data-v-0562f5c0>Appearance</p><div class="appearance-action" data-v-0562f5c0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" aria-label="toggle dark mode" data-v-0562f5c0 data-v-781f9d1b data-v-1dda4c9c><span class="check" data-v-1dda4c9c><span class="icon" data-v-1dda4c9c><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-781f9d1b><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-781f9d1b><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><div class="group" data-v-0562f5c0><div class="item social-links" data-v-0562f5c0><div class="VPSocialLinks social-links-list" data-v-0562f5c0 data-v-4dcbaf3a><!--[--><a class="VPSocialLink" href="https://github.com/" title="github" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg><span class="visually-hidden" data-v-48c45ef6>github</span></a><a class="VPSocialLink" href="..." title="twitter" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"></path></svg><span class="visually-hidden" data-v-48c45ef6>twitter</span></a><a class="VPSocialLink" href="..." title="discord" target="_blank" rel="noopener noreferrer" data-v-4dcbaf3a data-v-48c45ef6><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-48c45ef6><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"></path></svg><span class="visually-hidden" data-v-48c45ef6>discord</span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-8856f192 data-v-6f008456><span class="container" data-v-6f008456><span class="top" data-v-6f008456></span><span class="middle" data-v-6f008456></span><span class="bottom" data-v-6f008456></span></span></button></div></div></div><!----></header><div class="VPLocalNav" data-v-6b5fd0a9 data-v-92b0f14a><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-92b0f14a><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-92b0f14a><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-92b0f14a>Menu</span></button><a class="top-link" href="#" data-v-92b0f14a> Return to top </a></div><aside class="VPSidebar" data-v-6b5fd0a9 data-v-55e4c7db><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-55e4c7db><span class="visually-hidden" id="sidebar-aria-label" data-v-55e4c7db> Sidebar Navigation </span><!--[--><div class="group" data-v-55e4c7db><section class="VPSidebarGroup" data-v-55e4c7db data-v-1f69a7ed><div class="title" data-v-1f69a7ed><h2 class="title-text" data-v-1f69a7ed>Vite相关</h2><div class="action" data-v-1f69a7ed><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 24 24" class="icon minus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2zM20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h8c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon plus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2z M20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11h-3V8c0-0.6-0.4-1-1-1s-1,0.4-1,1v3H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h3v3c0,0.6,0.4,1,1,1s1-0.4,1-1v-3h3c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg></div></div><div class="items" data-v-1f69a7ed><!--[--><a class="VPLink link" href="/docs/%E7%AC%94%E8%AE%B0/%E6%96%B0%E5%BB%BAvite%E9%A1%B9%E7%9B%AE.html" data-v-1f69a7ed data-v-f53f775e data-v-5704c677><!--[--><span class="link-text" data-v-f53f775e>新建vite项目</span><!--]--><!----></a><a class="VPLink link" href="/docs/%E7%AC%94%E8%AE%B0/%E9%98%B2%E6%8A%96%E8%8A%82%E6%B5%81.html" data-v-1f69a7ed data-v-f53f775e data-v-5704c677><!--[--><span class="link-text" data-v-f53f775e>防抖节流</span><!--]--><!----></a><!--]--></div></section></div><div class="group" data-v-55e4c7db><section class="VPSidebarGroup" data-v-55e4c7db data-v-1f69a7ed><div class="title" data-v-1f69a7ed><h2 class="title-text" data-v-1f69a7ed>Vue相关</h2><div class="action" data-v-1f69a7ed><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 24 24" class="icon minus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2zM20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h8c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon plus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2z M20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11h-3V8c0-0.6-0.4-1-1-1s-1,0.4-1,1v3H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h3v3c0,0.6,0.4,1,1,1s1-0.4,1-1v-3h3c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg></div></div><div class="items" data-v-1f69a7ed><!--[--><a class="VPLink link" href="/docs/%E7%AC%94%E8%AE%B0/Vuex%E8%BE%85%E5%8A%A9%E5%87%BD%E6%95%B0.html" data-v-1f69a7ed data-v-f53f775e data-v-5704c677><!--[--><span class="link-text" data-v-f53f775e>Vuex辅助函数</span><!--]--><!----></a><!--]--></div></section></div><div class="group" data-v-55e4c7db><section class="VPSidebarGroup" data-v-55e4c7db data-v-1f69a7ed><div class="title" data-v-1f69a7ed><h2 class="title-text" data-v-1f69a7ed>文档相关</h2><div class="action" data-v-1f69a7ed><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 24 24" class="icon minus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2zM20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h8c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon plus" data-v-1f69a7ed><path d="M19,2H5C3.3,2,2,3.3,2,5v14c0,1.7,1.3,3,3,3h14c1.7,0,3-1.3,3-3V5C22,3.3,20.7,2,19,2z M20,19c0,0.6-0.4,1-1,1H5c-0.6,0-1-0.4-1-1V5c0-0.6,0.4-1,1-1h14c0.6,0,1,0.4,1,1V19z"></path><path d="M16,11h-3V8c0-0.6-0.4-1-1-1s-1,0.4-1,1v3H8c-0.6,0-1,0.4-1,1s0.4,1,1,1h3v3c0,0.6,0.4,1,1,1s1-0.4,1-1v-3h3c0.6,0,1-0.4,1-1S16.6,11,16,11z"></path></svg></div></div><div class="items" data-v-1f69a7ed><!--[--><a class="VPLink link active" href="/docs/%E7%AC%94%E8%AE%B0/API%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3.html" data-v-1f69a7ed data-v-f53f775e data-v-5704c677><!--[--><span class="link-text" data-v-f53f775e>API接口文档</span><!--]--><!----></a><!--]--></div></section></div><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-6b5fd0a9 data-v-a4c57a06><div class="VPDoc has-sidebar" data-v-a4c57a06 data-v-79ca2460><div class="container" data-v-79ca2460><div class="aside" data-v-79ca2460><div class="aside-curtain" data-v-79ca2460></div><div class="aside-container" data-v-79ca2460><div class="aside-content" data-v-79ca2460><div class="VPDocAside" data-v-79ca2460 data-v-779d834d><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline has-outline" data-v-779d834d data-v-51e5a8ce><div class="content" data-v-51e5a8ce><div class="outline-marker" data-v-51e5a8ce></div><div class="outline-title" data-v-51e5a8ce>在本页面跳转</div><nav aria-labelledby="doc-outline-aria-label" data-v-51e5a8ce><span class="visually-hidden" id="doc-outline-aria-label" data-v-51e5a8ce> Table of Contents for current page </span><ul class="root" data-v-51e5a8ce><!--[--><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-1-api-v1-接口说明" data-v-51e5a8ce>1.1. API V1 接口说明</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-2-登录" data-v-51e5a8ce>1.2. 登录</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-3-用户管理" data-v-51e5a8ce>1.3. 用户管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-4-权限管理" data-v-51e5a8ce>1.4. 权限管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-5-角色管理" data-v-51e5a8ce>1.5. 角色管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-6-商品分类管理" data-v-51e5a8ce>1.6. 商品分类管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-7-分类参数管理" data-v-51e5a8ce>1.7. 分类参数管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-8-商品管理" data-v-51e5a8ce>1.8. 商品管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-9-图片上传" data-v-51e5a8ce>1.9. 图片上传</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-10-订单管理" data-v-51e5a8ce>1.10. 订单管理</a><!----></li><li style="" data-v-51e5a8ce><a class="outline-link" href="#_1-11-数据统计" data-v-51e5a8ce>1.11. 数据统计</a><!----></li><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-779d834d></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-79ca2460><div class="content-container" data-v-79ca2460><!--[--><!--]--><main class="main" data-v-79ca2460><div style="position:relative;" class="vp-doc _docs_%E7%AC%94%E8%AE%B0_API%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3" data-v-79ca2460><div><h1 id="_1-电商管理后台-api-接口文档" tabindex="-1">1. 电商管理后台 API 接口文档 <a class="header-anchor" href="#_1-电商管理后台-api-接口文档" aria-hidden="true">#</a></h1><h2 id="_1-1-api-v1-接口说明" tabindex="-1">1.1. API V1 接口说明 <a class="header-anchor" href="#_1-1-api-v1-接口说明" aria-hidden="true">#</a></h2><ul><li><p>接口基准地址：</p><ul><li><code>http://127.0.0.1:8888/api/private/v1/</code></li></ul></li><li><p>网友提供的新接口：</p><ul><li><code>https://lianghj.top:8888/api/private/v1</code></li></ul></li><li><p>网友提供的最新接口（5.29）：</p><ul><li><code>http://admin.lianghj.top:8888/api/private/v1</code></li><li><code>http://120.78.137.246:8888/api/private/v1</code></li></ul></li><li><p>自己的服务器接口</p><ul><li><code>http://124.223.49.16:8889/api/private/v1</code></li></ul></li><li><p>服务端已开启 CORS 跨域支持</p></li><li><p>API V1 认证统一使用 Token 认证</p></li><li><p>需要授权的 API ，必须在请求头中使用 <code>Authorization</code> 字段提供 <code>token</code> 令牌</p></li><li><p>使用 HTTP Status Code 标识状态</p></li><li><p>数据返回格式统一使用 JSON</p></li></ul><h3 id="_1-1-1-支持的请求方法" tabindex="-1">1.1.1. 支持的请求方法 <a class="header-anchor" href="#_1-1-1-支持的请求方法" aria-hidden="true">#</a></h3><ul><li>GET（SELECT）：从服务器取出资源（一项或多项）。</li><li>POST（CREATE）：在服务器新建一个资源。</li><li>PUT（UPDATE）：在服务器更新资源（客户端提供改变后的完整资源）。</li><li>PATCH（UPDATE）：在服务器更新资源（客户端提供改变的属性）。</li><li>DELETE（DELETE）：从服务器删除资源。</li><li>HEAD：获取资源的元数据。</li><li>OPTIONS：获取信息，关于资源的哪些属性是客户端可以改变的。</li></ul><h3 id="_1-1-2-通用返回状态说明" tabindex="-1">1.1.2. 通用返回状态说明 <a class="header-anchor" href="#_1-1-2-通用返回状态说明" aria-hidden="true">#</a></h3><table><thead><tr><th><em>状态码</em></th><th><em>含义</em></th><th><em>说明</em></th></tr></thead><tbody><tr><td>200</td><td>OK</td><td>请求成功</td></tr><tr><td>201</td><td>CREATED</td><td>创建成功</td></tr><tr><td>204</td><td>DELETED</td><td>删除成功</td></tr><tr><td>400</td><td>BAD REQUEST</td><td>请求的地址不存在或者包含不支持的参数</td></tr><tr><td>401</td><td>UNAUTHORIZED</td><td>未授权</td></tr><tr><td>403</td><td>FORBIDDEN</td><td>被禁止访问</td></tr><tr><td>404</td><td>NOT FOUND</td><td>请求的资源不存在</td></tr><tr><td>422</td><td>Unprocesable entity</td><td>[POST/PUT/PATCH] 当创建一个对象时，发生一个验证错误</td></tr><tr><td>500</td><td>INTERNAL SERVER ERROR</td><td>内部错误</td></tr><tr><td></td><td></td><td></td></tr></tbody></table><hr><h2 id="_1-2-登录" tabindex="-1">1.2. 登录 <a class="header-anchor" href="#_1-2-登录" aria-hidden="true">#</a></h2><h3 id="_1-2-1-登录验证接口" tabindex="-1">1.2.1. 登录验证接口 <a class="header-anchor" href="#_1-2-1-登录验证接口" aria-hidden="true">#</a></h3><ul><li>请求路径：login</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>username</td><td>用户名</td><td>不能为空</td></tr><tr><td>password</td><td>密码</td><td>不能为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td></td></tr><tr><td>rid</td><td>用户角色 ID</td><td></td></tr><tr><td>username</td><td>用户名</td><td></td></tr><tr><td>mobile</td><td>手机号</td><td></td></tr><tr><td>email</td><td>邮箱</td><td></td></tr><tr><td>token</td><td>令牌</td><td>基于 jwt 的令牌</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">500</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">rid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">123</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">123@qq.com</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">token</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1MTI1NDQyOTksImV4cCI6MTUxMjYzMDY5OX0.eGrsrvwHm-tPsO9r_pxHIQ5i5L1kX9RX444uwnRGaIM</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">登录成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h2 id="_1-3-用户管理" tabindex="-1">1.3. 用户管理 <a class="header-anchor" href="#_1-3-用户管理" aria-hidden="true">#</a></h2><h3 id="_1-3-1-用户数据列表" tabindex="-1">1.3.1. 用户数据列表 <a class="header-anchor" href="#_1-3-1-用户数据列表" aria-hidden="true">#</a></h3><ul><li>请求路径：users</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>query</td><td>查询参数</td><td>可以为空</td></tr><tr><td>pagenum</td><td>当前页码</td><td>不能为空</td></tr><tr><td>pagesize</td><td>每页显示条数</td><td>不能为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>totalpage</td><td>总记录数</td><td></td></tr><tr><td>pagenum</td><td>当前页码</td><td></td></tr><tr><td>users</td><td>用户数据集合</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">totalpage</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">5</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">pagenum</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">4</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">users</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">25</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">tige117</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">18616358651</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">type</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">tige112@163.com</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">create_time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2017-11-09T20:36:26.000Z</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">mg_state</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">true,</span><span style="color:#A6ACCD;"> </span><span style="color:#676E95;font-style:italic;">// 当前用户的状态</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">role_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">炒鸡管理员</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-2-添加用户" tabindex="-1">1.3.2. 添加用户 <a class="header-anchor" href="#_1-3-2-添加用户" aria-hidden="true">#</a></h3><ul><li>请求路径：users</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>username</td><td>用户名称</td><td>不能为空</td></tr><tr><td>password</td><td>用户密码</td><td>不能为空</td></tr><tr><td>email</td><td>邮箱</td><td>可以为空</td></tr><tr><td>mobile</td><td>手机号</td><td>可以为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td></td></tr><tr><td>rid</td><td>用户角色 ID</td><td></td></tr><tr><td>username</td><td>用户名</td><td></td></tr><tr><td>mobile</td><td>手机号</td><td></td></tr><tr><td>email</td><td>邮箱</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">28</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">tige1200</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">test</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">type</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">openid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">test@test.com</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">create_time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2017-11-10T03:47:13.533Z</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">modify_time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">is_delete</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">is_active</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">用户创建成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">201</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-3-修改用户状态" tabindex="-1">1.3.3. 修改用户状态 <a class="header-anchor" href="#_1-3-3-修改用户状态" aria-hidden="true">#</a></h3><ul><li>请求路径：users/:uId/state/:type</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>uId</td><td>用户 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>type</td><td>用户状态</td><td>不能为空<code>携带在url中</code>，值为 true 或者 false</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">566</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">rid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">30</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">123456</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">bb@itcast.com</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mg_state</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">设置状态成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-4-根据-id-查询用户信息" tabindex="-1">1.3.4. 根据 ID 查询用户信息 <a class="header-anchor" href="#_1-3-4-根据-id-查询用户信息" aria-hidden="true">#</a></h3><ul><li>请求路径：users/:id</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td></td></tr><tr><td>role_id</td><td>角色 ID</td><td></td></tr><tr><td>mobile</td><td>手机号</td><td></td></tr><tr><td>email</td><td>邮箱</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">503</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin3</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">role_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">00000</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">new@new.com</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">查询成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-5-编辑用户提交" tabindex="-1">1.3.5. 编辑用户提交 <a class="header-anchor" href="#_1-3-5-编辑用户提交" aria-hidden="true">#</a></h3><ul><li>请求路径：users/:id</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 id</td><td>不能为空 <code>参数是url参数:id</code></td></tr><tr><td>email</td><td>邮箱</td><td>可以为空</td></tr><tr><td>mobile</td><td>手机号</td><td>可以为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td></td></tr><tr><td>role_id</td><td>角色 ID</td><td></td></tr><tr><td>mobile</td><td>手机号</td><td></td></tr><tr><td>email</td><td>邮箱</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#676E95;font-style:italic;">/* 200表示成功，500表示失败 */</span></span>
<span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">503</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin3</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">role_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">111</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">123@123.com</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">更新成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-6-删除单个用户" tabindex="-1">1.3.6. 删除单个用户 <a class="header-anchor" href="#_1-3-6-删除单个用户" aria-hidden="true">#</a></h3><ul><li>请求路径：users/:id</li><li>请求方法：delete</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 id</td><td>不能为空<code>参数是url参数:id</code></td></tr></tbody></table><ul><li>响应参数</li><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">删除成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-3-7-分配用户角色" tabindex="-1">1.3.7. 分配用户角色 <a class="header-anchor" href="#_1-3-7-分配用户角色" aria-hidden="true">#</a></h3><ul><li>请求路径：users/:id/role</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td>不能为空<code>参数是url参数:id</code></td></tr><tr><td>rid</td><td>角色 id</td><td>不能为空<code>参数body参数</code></td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>用户 ID</td><td></td></tr><tr><td>role_id</td><td>角色 ID</td><td></td></tr><tr><td>mobile</td><td>手机号</td><td></td></tr><tr><td>email</td><td>邮箱</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">508</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">rid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">30</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">username</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">asdf1</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">mobile</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">123123</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">email</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">adfsa@qq.com</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">设置角色成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h2 id="_1-4-权限管理" tabindex="-1">1.4. 权限管理 <a class="header-anchor" href="#_1-4-权限管理" aria-hidden="true">#</a></h2><h3 id="_1-4-1-所有权限列表" tabindex="-1">1.4.1. 所有权限列表 <a class="header-anchor" href="#_1-4-1-所有权限列表" aria-hidden="true">#</a></h3><ul><li>请求路径：rights/:type</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>type</td><td>类型</td><td>值 list 或 tree , list 列表显示权限, tree 树状显示权限,<code>参数是url参数:type</code></td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>权限 ID</td><td></td></tr><tr><td>authName</td><td>权限说明</td><td></td></tr><tr><td>level</td><td>权限层级</td><td></td></tr><tr><td>pid</td><td>权限父 ID</td><td></td></tr><tr><td>path</td><td>对应访问路径</td><td></td></tr></tbody></table><ul><li>响应数据 type=list</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品管理</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">0</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">102</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">订单管理</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">0</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取权限列表成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><p>type=tree</p><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    data</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        id</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        authName</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> &#39;商品管理&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        path</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">        pid</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        children</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">          </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            id</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">104</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            authName</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> &#39;商品列表&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            path</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">            pid</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            children</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">              </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                id</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">105</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                authName</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> &#39;添加商品&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                path</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                pid</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> &#39;</span><span style="color:#F78C6C;">104</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;">101&#39;</span></span>
<span class="line"><span style="color:#A6ACCD;">              </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">          </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">    meta</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      msg</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> &#39;获取权限列表成功&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      status</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-4-2-左侧菜单权限" tabindex="-1">1.4.2. 左侧菜单权限 <a class="header-anchor" href="#_1-4-2-左侧菜单权限" aria-hidden="true">#</a></h3><ul><li>请求路径：menus</li><li>请求方法：get</li><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品管理</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">104</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品列表</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[]</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#A6ACCD;">: </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取菜单列表成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h2 id="_1-5-角色管理" tabindex="-1">1.5. 角色管理 <a class="header-anchor" href="#_1-5-角色管理" aria-hidden="true">#</a></h2><h3 id="_1-5-1-角色列表" tabindex="-1">1.5.1. 角色列表 <a class="header-anchor" href="#_1-5-1-角色列表" aria-hidden="true">#</a></h3><ul><li><p>请求路径：roles</p></li><li><p>请求方法：get</p></li><li><p>响应数据说明</p><ul><li>第一层为角色信息</li></ul><ul><li>第二层开始为权限说明，权限一共有 3 层权限</li><li>最后一层权限，不包含 <code>children</code> 属性</li></ul></li><li><p>响应数据</p></li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">30</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">主管</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleDesc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">技术负责人</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品管理</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">104</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品列表</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                                </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#916B53;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">105</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#916B53;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">添加商品</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#916B53;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span>
<span class="line"><span style="color:#A6ACCD;">                                </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-2-添加角色" tabindex="-1">1.5.2. 添加角色 <a class="header-anchor" href="#_1-5-2-添加角色" aria-hidden="true">#</a></h3><ul><li>请求路径：roles</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>roleName</td><td>角色名称</td><td>不能为空</td></tr><tr><td>roleDesc</td><td>角色描述</td><td>可以为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>roleId</td><td>角色 ID</td><td></td></tr><tr><td>roleName</td><td>角色名称</td><td></td></tr><tr><td>roleDesc</td><td>角色描述</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleId</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">40</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin2</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleDesc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">admin2Desc</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">创建成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">201</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-3-根据-id-查询角色" tabindex="-1">1.5.3. 根据 ID 查询角色 <a class="header-anchor" href="#_1-5-3-根据-id-查询角色" aria-hidden="true">#</a></h3><ul><li>请求路径：roles/:id</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>角色 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>roleId</td><td>角色 ID</td><td></td></tr><tr><td>roleName</td><td>角色名称</td><td></td></tr><tr><td>roleDesc</td><td>角色描述</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleId</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">31</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">测试角色</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleDesc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">测试负责人</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-4-编辑提交角色" tabindex="-1">1.5.4. 编辑提交角色 <a class="header-anchor" href="#_1-5-4-编辑提交角色" aria-hidden="true">#</a></h3><ul><li>请求路径：roles/:id</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>角色 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>roleName</td><td>角色名称</td><td>不能为空</td></tr><tr><td>roleDesc</td><td>角色描述</td><td>可以为空</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleId</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">31</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">测试角色</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">roleDesc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">测试角色描述</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-5-删除角色" tabindex="-1">1.5.5. 删除角色 <a class="header-anchor" href="#_1-5-5-删除角色" aria-hidden="true">#</a></h3><ul><li>请求路径：roles/:id</li><li>请求方法：delete</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>角色 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">删除成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-6-角色授权" tabindex="-1">1.5.6. 角色授权 <a class="header-anchor" href="#_1-5-6-角色授权" aria-hidden="true">#</a></h3><ul><li>请求路径：roles/:roleId/rights</li><li>请求方法：post</li><li>请求参数：通过 <code>请求体</code> 发送给后端</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:roleId</td><td>角色 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>rids</td><td>权限 ID 列表（字符串）</td><td>以 <code>,</code> 分割的权限 ID 列表（获取所有被选中、叶子节点的key和半选中节点的key, 包括 1，2，3级节点）</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">更新成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-5-7-删除角色指定权限" tabindex="-1">1.5.7. 删除角色指定权限 <a class="header-anchor" href="#_1-5-7-删除角色指定权限" aria-hidden="true">#</a></h3><ul><li><p>请求路径：roles/:roleId/rights/:rightId</p></li><li><p>请求方法：delete</p></li><li><p>请求参数</p><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:roleId</td><td>角色 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>:rightId</td><td>权限 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table></li><li><p>响应数据说明</p><ul><li>返回的data, 是当前角色下最新的权限数据</li></ul></li><li><p>响应数据</p><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">101</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品管理</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">104</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品列表</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">105</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">添加商品</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">116</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">authName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">修改</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">path</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">取消权限成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div></li></ul><h2 id="_1-6-商品分类管理" tabindex="-1">1.6. 商品分类管理 <a class="header-anchor" href="#_1-6-商品分类管理" aria-hidden="true">#</a></h2><h3 id="_1-6-1-商品分类数据列表" tabindex="-1">1.6.1. 商品分类数据列表 <a class="header-anchor" href="#_1-6-1-商品分类数据列表" aria-hidden="true">#</a></h3><ul><li>请求路径：categories</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>type</td><td>[1,2,3]</td><td>值：1，2，3 分别表示显示一层二层三层分类列表<br>【可选参数】如果不传递，则默认获取所有级别的分类</td></tr><tr><td>pagenum</td><td>当前页码值</td><td>【可选参数】如果不传递，则默认获取所有分类</td></tr><tr><td>pagesize</td><td>每页显示多少条数据</td><td>【可选参数】如果不传递，则默认获取所有分类</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>cat_id</td><td>分类 ID</td><td></td></tr><tr><td>cat_name</td><td>分类名称</td><td></td></tr><tr><td>cat_pid</td><td>分类父 ID</td><td></td></tr><tr><td>cat_level</td><td>分类当前层级</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">大家电</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_deleted</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false,</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">3</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">cat_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">电视</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">cat_pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">cat_level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">cat_deleted</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false,</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">children</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">6</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">曲面电视</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">3</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">2</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_deleted</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">7</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">海信</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">3</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">2</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                            </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">cat_deleted</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false</span></span>
<span class="line"><span style="color:#A6ACCD;">                        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">                    </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-6-2-添加分类" tabindex="-1">1.6.2. 添加分类 <a class="header-anchor" href="#_1-6-2-添加分类" aria-hidden="true">#</a></h3><ul><li>请求路径：categories</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>cat_pid</td><td>分类父 ID</td><td>不能为空，如果要添加1级分类，则父分类Id应该设置为 <code>0</code></td></tr><tr><td>cat_name</td><td>分类名称</td><td>不能为空</td></tr><tr><td>cat_level</td><td>分类层级</td><td>不能为空，<code>0</code>表示一级分类；<code>1</code>表示二级分类；<code>2</code>表示三级分类</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">62</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">相框</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_pid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">1</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_level</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">1</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">创建成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">201</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-6-3-根据-id-查询分类" tabindex="-1">1.6.3. 根据 id 查询分类 <a class="header-anchor" href="#_1-6-3-根据-id-查询分类" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_id&quot;: 3,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_name&quot;: &quot;厨卫电器&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_pid&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_level&quot;: 0</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-6-4-编辑提交分类" tabindex="-1">1.6.4. 编辑提交分类 <a class="header-anchor" href="#_1-6-4-编辑提交分类" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>cat_name</td><td>分类名称</td><td>不能为空【此参数，放到请求体中】</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_id&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_name&quot;: &quot;自拍杆&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_pid&quot;: 7,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_level&quot;: 2</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;更新成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-6-5-删除分类" tabindex="-1">1.6.5. 删除分类 <a class="header-anchor" href="#_1-6-5-删除分类" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id</li><li>请求方法：delete</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;删除成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h2 id="_1-7-分类参数管理" tabindex="-1">1.7. 分类参数管理 <a class="header-anchor" href="#_1-7-分类参数管理" aria-hidden="true">#</a></h2><h3 id="_1-7-1-参数列表" tabindex="-1">1.7.1. 参数列表 <a class="header-anchor" href="#_1-7-1-参数列表" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id/attributes</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>sel</td><td>[only,many]</td><td>不能为空,通过 only 或 many 来获取分类静态参数还是动态参数</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>attr_id</td><td>分类参数 ID</td><td></td></tr><tr><td>attr_name</td><td>分类参数名称</td><td></td></tr><tr><td>cat_id</td><td>分类参数所属分类</td><td></td></tr><tr><td>attr_sel</td><td>only:输入框(唯一) many:后台下拉列表/前台单选框</td><td></td></tr><tr><td>attr_write</td><td>manual:手工录入 list:从列表选择</td><td></td></tr><tr><td>attr_vals</td><td>如果 attr_write:list,那么有值，该值以逗号分隔</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">        {</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;attr_id&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;attr_name&quot;: &quot;cpu&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;cat_id&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;attr_sel&quot;: &quot;only&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;attr_write&quot;: &quot;manual&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">            &quot;attr_vals&quot;: &quot;ffff&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">        }</span></span>
<span class="line"><span style="color:#A6ACCD;">    ],</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-7-2-添加动态参数或者静态属性" tabindex="-1">1.7.2. 添加动态参数或者静态属性 <a class="header-anchor" href="#_1-7-2-添加动态参数或者静态属性" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id/attributes</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>attr_name</td><td>参数名称</td><td>不能为空</td></tr><tr><td>attr_sel</td><td>[only,many]</td><td>不能为空</td></tr><tr><td>attr_vals</td><td>如果是 many 就需要填写值的选项，以逗号分隔</td><td>【可选参数】</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_id&quot;: 44,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_name&quot;: &quot;测试参数&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_id&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_vals&quot;: &quot;a,b,c&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;创建成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 201</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-7-3-删除参数" tabindex="-1">1.7.3. 删除参数 <a class="header-anchor" href="#_1-7-3-删除参数" aria-hidden="true">#</a></h3><ul><li>请求路径： categories/:id/attributes/:attrid</li><li>请求方法：delete</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>:attrid</td><td>参数 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;删除成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-7-4-根据-id-查询参数" tabindex="-1">1.7.4. 根据 ID 查询参数 <a class="header-anchor" href="#_1-7-4-根据-id-查询参数" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id/attributes/:attrId</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>:attrId</td><td>属性 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>attr_sel</td><td>[only,many]</td><td>不能为空</td></tr><tr><td>attr_vals</td><td>如果是 many 就需要填写值的选项，以逗号分隔</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_id&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_name&quot;: &quot;cpu&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_id&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_sel&quot;: &quot;only&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_write&quot;: &quot;manual&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_vals&quot;: &quot;ffff&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-7-5-编辑提交参数" tabindex="-1">1.7.5. 编辑提交参数 <a class="header-anchor" href="#_1-7-5-编辑提交参数" aria-hidden="true">#</a></h3><ul><li>请求路径：categories/:id/attributes/:attrId</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>:id</td><td>分类 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>:attrId</td><td>属性 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>attr_name</td><td>新属性的名字</td><td>不能为空，携带在<code>请求体</code>中</td></tr><tr><td>attr_sel</td><td>属性的类型[many或only]</td><td>不能为空，携带在<code>请求体</code>中</td></tr><tr><td>attr_vals</td><td>参数的属性值</td><td>可选参数，携带在<code>请求体</code>中</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_id&quot;: 9,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_name&quot;: &quot;测试更新&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;cat_id&quot;: &quot;43&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_sel&quot;: &quot;only&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_write&quot;: &quot;manual&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attr_vals&quot;: &quot;abc&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;更新成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h2 id="_1-8-商品管理" tabindex="-1">1.8. 商品管理 <a class="header-anchor" href="#_1-8-商品管理" aria-hidden="true">#</a></h2><h3 id="_1-8-1-商品列表数据" tabindex="-1">1.8.1. 商品列表数据 <a class="header-anchor" href="#_1-8-1-商品列表数据" aria-hidden="true">#</a></h3><ul><li>请求路径：goods</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>query</td><td>查询参数</td><td>可以为空</td></tr><tr><td>pagenum</td><td>当前页码</td><td>不能为空</td></tr><tr><td>pagesize</td><td>每页显示条数</td><td>不能为空</td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>total</td><td>总共商品条数</td><td></td></tr><tr><td>pagenum</td><td>当前商品页数</td><td></td></tr><tr><td>goods_id</td><td>商品 ID</td><td></td></tr><tr><td>goods_name</td><td>商品名称</td><td></td></tr><tr><td>goods_price</td><td>价格</td><td></td></tr><tr><td>goods_number</td><td>数量</td><td></td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_state</td><td>商品状态</td><td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr><tr><td>add_time</td><td>添加时间</td><td></td></tr><tr><td>upd_time</td><td>更新时间</td><td></td></tr><tr><td>hot_mumber</td><td>热销品数量</td><td></td></tr><tr><td>is_promote</td><td>是否是热销品</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;total&quot;: 50,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pagenum&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 144,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_name&quot;: &quot;asfdsd&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_price&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_number&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_weight&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_state&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_time&quot;: 1512954923,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;upd_time&quot;: 1512954923,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;hot_mumber&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;is_promote&quot;: false</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-8-2-添加商品" tabindex="-1">1.8.2. 添加商品 <a class="header-anchor" href="#_1-8-2-添加商品" aria-hidden="true">#</a></h3><ul><li>请求路径：goods</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>goods_name</td><td>商品名称</td><td>不能为空</td></tr><tr><td>goods_cat</td><td>以为&#39;,&#39;分割的分类列表</td><td>不能为空</td></tr><tr><td>goods_price</td><td>价格</td><td>不能为空</td></tr><tr><td>goods_number</td><td>数量</td><td>不能为空</td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_introduce</td><td>介绍</td><td>可以为空</td></tr><tr><td>pics</td><td>上传的图片临时路径（对象）</td><td>可以为空</td></tr><tr><td>attrs</td><td>商品的参数（数组），包含 <code>动态参数</code> 和 <code>静态属性</code></td><td>可以为空</td></tr></tbody></table><ul><li>请求数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">test_goods_name2</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_cat</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">1,2,3</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_price</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#F78C6C;">20</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_number</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#F78C6C;">30</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_weight</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#F78C6C;">40</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">goods_introduce</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">abc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">pics</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:[</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">pic</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">/tmp_uploads/30f08d52c551ecb447277eae232304b8</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">attrs</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:[</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">attr_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#F78C6C;">15</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">attr_value</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">ddd</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">attr_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#F78C6C;">15</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">attr_value</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">eee</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>total</td><td>总共商品条数</td><td></td></tr><tr><td>pagenum</td><td>当前商品页数</td><td></td></tr><tr><td>goods_id</td><td>商品 ID</td><td></td></tr><tr><td>goods_cat</td><td>以为&#39;,&#39;分割的分类列表</td><td></td></tr><tr><td>goods_name</td><td>商品名称</td><td></td></tr><tr><td>goods_price</td><td>价格</td><td></td></tr><tr><td>goods_number</td><td>数量</td><td></td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_state</td><td>商品状态</td><td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr><tr><td>add_time</td><td>添加时间</td><td></td></tr><tr><td>upd_time</td><td>更新时间</td><td></td></tr><tr><td>hot_mumber</td><td>热销品数量</td><td></td></tr><tr><td>is_promote</td><td>是否是热销品</td><td></td></tr><tr><td>pics</td><td>上传的图片临时路径（对象）</td><td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr><tr><td>attrs</td><td>商品的参数（数组）</td><td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">145</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">test_goods_name2</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_price</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">20</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">cat_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_number</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">30</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_weight</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">40</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_introduce</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">abc</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_big_logo</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_small_logo</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">goods_state</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">add_time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1512962370</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">upd_time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">1512962370</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">hot_mumber</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">0</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">is_promote</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">pics</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">pics_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">397</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">goods_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">145</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">pics_big</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">uploads/goodspics/big_30f08d52c551ecb447277eae232304b8</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">pics_mid</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">pics_sma</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">attrs</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">goods_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">145</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">15</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_value</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">ddd</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">add_price</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">fffffff</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_sel</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">many</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_write</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">list</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_vals</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">goods_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">145</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_id</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">15</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_value</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">eee</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">add_price</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_name</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">fffffff</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_sel</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">many</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_write</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">list</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">                </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">attr_vals</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">msg</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">创建商品成功</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">        </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">201</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><h3 id="_1-8-3-根据-id-查询商品" tabindex="-1">1.8.3. 根据 ID 查询商品 <a class="header-anchor" href="#_1-8-3-根据-id-查询商品" aria-hidden="true">#</a></h3><ul><li>请求路径：goods/:id</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>商品 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>total</td><td>总共商品条数</td><td></td></tr><tr><td>pagenum</td><td>当前商品页数</td><td></td></tr><tr><td>goods_id</td><td>商品 ID</td><td></td></tr><tr><td>goods_name</td><td>商品名称</td><td></td></tr><tr><td>goods_price</td><td>价格</td><td></td></tr><tr><td>goods_number</td><td>数量</td><td></td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_state</td><td>商品状态</td><td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr><tr><td>add_time</td><td>添加时间</td><td></td></tr><tr><td>upd_time</td><td>更新时间</td><td></td></tr><tr><td>hot_mumber</td><td>热销品数量</td><td></td></tr><tr><td>is_promote</td><td>是否是热销品</td><td></td></tr><tr><td>pics</td><td>上传的图片临时路径（对象）</td><td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr><tr><td>attrs</td><td>商品的参数（数组）</td><td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_name&quot;: &quot;test_goods_name2&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_price&quot;: 20,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_number&quot;: 30,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_weight&quot;: 40,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_introduce&quot;: &quot;abc&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_big_logo&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_small_logo&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_state&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;add_time&quot;: 1512962370,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;upd_time&quot;: 1512962370,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;hot_mumber&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_promote&quot;: false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pics&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_id&quot;: 397,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_big&quot;: &quot;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ],</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attrs&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;ddd&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;eee&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;创建商品成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 201</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-8-4-编辑提交商品" tabindex="-1">1.8.4. 编辑提交商品 <a class="header-anchor" href="#_1-8-4-编辑提交商品" aria-hidden="true">#</a></h3><ul><li>请求路径：goods/:id</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>商品 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>goods_name</td><td>商品名称</td><td>不能为空</td></tr><tr><td>goods_price</td><td>价格</td><td>不能为空</td></tr><tr><td>goods_number</td><td>数量</td><td>不能为空</td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_introduce</td><td>介绍</td><td>可以为空</td></tr><tr><td>pics</td><td>上传的图片临时路径（对象）</td><td>可以为空</td></tr><tr><td>attrs</td><td>商品的参数（数组）</td><td>可以为空</td></tr></tbody></table><ul><li>请求数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;goods_name&quot;:&quot;test_goods_name2&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;goods_price&quot;:20,</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;goods_number&quot;:30,</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;goods_weight&quot;:40,</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;goods_introduce&quot;:&quot;abc&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;pics&quot;:[</span></span>
<span class="line"><span style="color:#A6ACCD;">    {&quot;pic&quot;:&quot;/tmp_uploads/30f08d52c551ecb447277eae232304b8&quot;}</span></span>
<span class="line"><span style="color:#A6ACCD;">    ],</span></span>
<span class="line"><span style="color:#A6ACCD;">  &quot;attrs&quot;:[</span></span>
<span class="line"><span style="color:#A6ACCD;">    {</span></span>
<span class="line"><span style="color:#A6ACCD;">      &quot;attr_id&quot;:15,</span></span>
<span class="line"><span style="color:#A6ACCD;">      &quot;attr_value&quot;:&quot;ddd&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    {</span></span>
<span class="line"><span style="color:#A6ACCD;">      &quot;attr_id&quot;:15,</span></span>
<span class="line"><span style="color:#A6ACCD;">      &quot;attr_value&quot;:&quot;eee&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">    ]</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><ul><li>响应参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>total</td><td>总共商品条数</td><td></td></tr><tr><td>pagenum</td><td>当前商品页数</td><td></td></tr><tr><td>goods_id</td><td>商品 ID</td><td></td></tr><tr><td>goods_name</td><td>商品名称</td><td></td></tr><tr><td>goods_price</td><td>价格</td><td></td></tr><tr><td>goods_number</td><td>数量</td><td></td></tr><tr><td>goods_weight</td><td>重量</td><td>不能为空</td></tr><tr><td>goods_state</td><td>商品状态</td><td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr><tr><td>add_time</td><td>添加时间</td><td></td></tr><tr><td>upd_time</td><td>更新时间</td><td></td></tr><tr><td>hot_mumber</td><td>热销品数量</td><td></td></tr><tr><td>is_promote</td><td>是否是热销品</td><td></td></tr><tr><td>pics</td><td>上传的图片临时路径（对象）</td><td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr><tr><td>attrs</td><td>商品的参数（数组）</td><td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_name&quot;: &quot;test_goods_name2&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_price&quot;: 20,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_number&quot;: 30,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_weight&quot;: 40,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_introduce&quot;: &quot;abc&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_big_logo&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_small_logo&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_state&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;add_time&quot;: 1512962370,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;upd_time&quot;: 1512962370,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;hot_mumber&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_promote&quot;: false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pics&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_id&quot;: 397,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_big&quot;: &quot;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ],</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attrs&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;ddd&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;eee&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;创建商品成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 201</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-8-5-删除商品" tabindex="-1">1.8.5. 删除商品 <a class="header-anchor" href="#_1-8-5-删除商品" aria-hidden="true">#</a></h3><ul><li>请求路径：goods/:id</li><li>请求方法：delete</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>商品 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;删除成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><p>###同步商品图片</p><ul><li>请求路径：goods/:id/pics</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>商品 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>pics</td><td>商品图片集合</td><td>如果有 pics_id 字段会保留该图片，如果没有 pics_id 但是有 pic 字段就会新生成图片数据</td></tr></tbody></table><ul><li>请求数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">;[</span></span>
<span class="line"><span style="color:#A6ACCD;">  { pic: &#39;tmp_uploads/db28f6316835836e97653b5c75e418be.png&#39; },</span></span>
<span class="line"><span style="color:#A6ACCD;">  {</span></span>
<span class="line"><span style="color:#A6ACCD;">    pics_id: 397,</span></span>
<span class="line"><span style="color:#A6ACCD;">    goods_id: 145,</span></span>
<span class="line"><span style="color:#A6ACCD;">    pics_big: &#39;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&#39;,</span></span>
<span class="line"><span style="color:#A6ACCD;">    pics_mid: &#39;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&#39;,</span></span>
<span class="line"><span style="color:#A6ACCD;">    pics_sma: &#39;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&#39;</span></span>
<span class="line"><span style="color:#A6ACCD;">  }</span></span>
<span class="line"><span style="color:#A6ACCD;">]</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_name&quot;: &quot;iphoneXX&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_price&quot;: 2,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_number&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_weight&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_introduce&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_big_logo&quot;: &quot;./uploads/goods/20171113/483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_small_logo&quot;: &quot;./uploads/goods/20171113/small_483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_state&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_del&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;add_time&quot;: 1510045904,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;upd_time&quot;: 1512635159,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;delete_time&quot;: 1512635159,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;hot_mumber&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_promote&quot;: false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pics&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_id&quot;: 383,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_big&quot;: &quot;uploads/goodspics/big_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ],</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attrs&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;eee&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;ddd&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;更新成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><p>###同步商品属性</p><ul><li>请求路径：goods/:id/attributes</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>商品 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>请求数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">;[</span></span>
<span class="line"><span style="color:#A6ACCD;">  {</span></span>
<span class="line"><span style="color:#A6ACCD;">    attr_id: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">    attr_value: &#39;ddd&#39;</span></span>
<span class="line"><span style="color:#A6ACCD;">  },</span></span>
<span class="line"><span style="color:#A6ACCD;">  {</span></span>
<span class="line"><span style="color:#A6ACCD;">    attr_id: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">    attr_value: &#39;eee&#39;</span></span>
<span class="line"><span style="color:#A6ACCD;">  }</span></span>
<span class="line"><span style="color:#A6ACCD;">]</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_name&quot;: &quot;iphoneXX&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_price&quot;: 2,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_number&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_weight&quot;: 22,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_introduce&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_big_logo&quot;: &quot;./uploads/goods/20171113/483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_small_logo&quot;: &quot;./uploads/goods/20171113/small_483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods_state&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_del&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;add_time&quot;: 1510045904,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;upd_time&quot;: 1512635159,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;delete_time&quot;: 1512635159,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;hot_mumber&quot;: 0,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_promote&quot;: false,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pics&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_id&quot;: 383,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_big&quot;: &quot;uploads/goodspics/big_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ],</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;attrs&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;eee&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_id&quot;: 15,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_value&quot;: &quot;ddd&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;add_price&quot;: null,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_name&quot;: &quot;fffffff&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_sel&quot;: &quot;many&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_write&quot;: &quot;list&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;attr_vals&quot;: &quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;更新成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><p>###商品图片处理必须安装 GraphicsMagick</p><ul><li>linux</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">apt-get install GraphicsMagick</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><ul><li>Mac OS X</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">brew install GraphicsMagick</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><ul><li>Windows <a href="https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binaries/1.3.27/GraphicsMagick-1.3.27-Q8-win64-dll.exe/download" target="_blank" rel="noopener noreferrer">点击下载</a></li></ul><h2 id="_1-9-图片上传" tabindex="-1">1.9. 图片上传 <a class="header-anchor" href="#_1-9-图片上传" aria-hidden="true">#</a></h2><ul><li>请求路径：upload</li><li>请求方法：post</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>file</td><td>上传文件</td><td></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;tmp_path&quot;: &quot;tmp_uploads/ccfc5179a914e94506bcbb7377e8985f.png&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;url&quot;: &quot;http://127.0.0.1:8888tmp_uploads/ccfc5179a914e94506bcbb7377e8985f.png&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;上传成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h2 id="_1-10-订单管理" tabindex="-1">1.10. 订单管理 <a class="header-anchor" href="#_1-10-订单管理" aria-hidden="true">#</a></h2><h3 id="_1-10-1-订单数据列表" tabindex="-1">1.10.1. 订单数据列表 <a class="header-anchor" href="#_1-10-1-订单数据列表" aria-hidden="true">#</a></h3><ul><li>请求路径：orders</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>query</td><td>查询参数</td><td>可以为空</td></tr><tr><td>pagenum</td><td>当前页码</td><td>不能为空</td></tr><tr><td>pagesize</td><td>每页显示条数</td><td>不能为空</td></tr><tr><td>user_id</td><td>用户 ID</td><td>可以为空</td></tr><tr><td>pay_status</td><td>支付状态</td><td>可以为空</td></tr><tr><td>is_send</td><td>是否发货</td><td>可以为空</td></tr><tr><td>order_fapiao_title</td><td>[&#39;个人&#39;,&#39;公司&#39;]</td><td>可以为空</td></tr><tr><td>order_fapiao_company</td><td>公司名称</td><td>可以为空</td></tr><tr><td>order_fapiao_content</td><td>发票内容</td><td>可以为空</td></tr><tr><td>consignee_addr</td><td>发货地址</td><td>可以为空</td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;total&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pagenum&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_id&quot;: 47,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;user_id&quot;: 133,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_number&quot;: &quot;itcast-59e7502d7993d&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_price&quot;: 322,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_pay&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;is_send&quot;: &quot;是&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;trade_no&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_fapiao_title&quot;: &quot;个人&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_fapiao_company&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_fapiao_content&quot;: &quot;办公用品&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;consignee_addr&quot;: &quot;a:7:{s:6:\&quot;cgn_id\&quot;;i:1;s:7:\&quot;user_id\&quot;;i:133;s:8:\&quot;cgn_name\&quot;;s:9:\&quot;王二柱\&quot;;s:11:\&quot;cgn_address\&quot;;s:51:\&quot;北京市海淀区苏州街长远天地大厦305室\&quot;;s:7:\&quot;cgn_tel\&quot;;s:11:\&quot;13566771298\&quot;;s:8:\&quot;cgn_code\&quot;;s:6:\&quot;306810\&quot;;s:11:\&quot;delete_time\&quot;;N;}&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;pay_status&quot;: &quot;1&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;create_time&quot;: 1508331565,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;update_time&quot;: 1508331565</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-10-2-修改订单状态" tabindex="-1">1.10.2. 修改订单状态 <a class="header-anchor" href="#_1-10-2-修改订单状态" aria-hidden="true">#</a></h3><ul><li>请求路径：orders/:id</li><li>请求方法：put</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>订单 ID</td><td>不能为空<code>携带在url中</code></td></tr><tr><td>is_send</td><td>订单是否发货</td><td>1:已经发货，0:未发货</td></tr><tr><td>order_pay</td><td>订单支付</td><td>支付方式 0 未支付 1 支付宝 2 微信 3 银行卡</td></tr><tr><td>order_price</td><td>订单价格</td><td></td></tr><tr><td>order_number</td><td>订单数量</td><td></td></tr><tr><td>pay_status</td><td>支付状态</td><td>订单状态： 0 未付款、1 已付款</td></tr></tbody></table><ul><li>请求数据说明 <ul><li>所有请求数据都是增量更新，如果参数不填写，就不会更新该字段</li></ul></li><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;user_id&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_number&quot;: &quot;itcast-g7kmck71vjaujfgoi&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_price&quot;: 20,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_pay&quot;: &quot;0&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_send&quot;: &quot;否&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;trade_no&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_title&quot;: &quot;个人&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_company&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_content&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;consignee_addr&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pay_status&quot;: &quot;0&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;create_time&quot;: 1512533560,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;update_time&quot;: 1512533560,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;id&quot;: 82,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_price&quot;: 333,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_number&quot;: 2,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_total_price&quot;: 999</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;id&quot;: 83,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 95,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_price&quot;: 666,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_number&quot;: 5,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_total_price&quot;: 999</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-10-3-查看订单详情" tabindex="-1">1.10.3. 查看订单详情 <a class="header-anchor" href="#_1-10-3-查看订单详情" aria-hidden="true">#</a></h3><ul><li>请求路径：orders/:id</li><li>请求方法：get</li><li>请求参数</li></ul><table><thead><tr><th>参数名</th><th>参数说明</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>订单 ID</td><td>不能为空<code>携带在url中</code></td></tr></tbody></table><ul><li>响应数据</li></ul><div class="language-"><span class="copy"></span><pre><code><span class="line"><span style="color:#A6ACCD;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;data&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;user_id&quot;: 1,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_number&quot;: &quot;itcast-g7kmck71vjaujfgoi&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_price&quot;: 20,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_pay&quot;: &quot;0&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;is_send&quot;: &quot;否&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;trade_no&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_title&quot;: &quot;个人&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_company&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;order_fapiao_content&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;consignee_addr&quot;: &quot;&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;pay_status&quot;: &quot;0&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;create_time&quot;: 1512533560,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;update_time&quot;: 1512533560,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;goods&quot;: [</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;id&quot;: 82,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 96,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_price&quot;: 333,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_number&quot;: 2,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_total_price&quot;: 999</span></span>
<span class="line"><span style="color:#A6ACCD;">            },</span></span>
<span class="line"><span style="color:#A6ACCD;">            {</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;id&quot;: 83,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;order_id&quot;: 67,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_id&quot;: 95,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_price&quot;: 666,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_number&quot;: 5,</span></span>
<span class="line"><span style="color:#A6ACCD;">                &quot;goods_total_price&quot;: 999</span></span>
<span class="line"><span style="color:#A6ACCD;">            }</span></span>
<span class="line"><span style="color:#A6ACCD;">        ]</span></span>
<span class="line"><span style="color:#A6ACCD;">    },</span></span>
<span class="line"><span style="color:#A6ACCD;">    &quot;meta&quot;: {</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;msg&quot;: &quot;获取成功&quot;,</span></span>
<span class="line"><span style="color:#A6ACCD;">        &quot;status&quot;: 200</span></span>
<span class="line"><span style="color:#A6ACCD;">    }</span></span>
<span class="line"><span style="color:#A6ACCD;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><h3 id="_1-10-4-修改地址" tabindex="-1">1.10.4. 修改地址 <a class="header-anchor" href="#_1-10-4-修改地址" aria-hidden="true">#</a></h3><ol><li><a href="https://github.com/iceyangcc/provinces-china" target="_blank" rel="noopener noreferrer">省市区/县联动效果 - 结合ElementUI的 el-cascader 组件</a></li></ol><h3 id="_1-10-5-查看物流信息" tabindex="-1">1.10.5. 查看物流信息 <a class="header-anchor" href="#_1-10-5-查看物流信息" aria-hidden="true">#</a></h3><ul><li><p>请求路径：/kuaidi/:id</p></li><li><p>请求方法：get</p></li><li><p>供测试的物流单号：1106975712662</p></li><li><p>响应数据：</p><div class="language-json"><span class="copy"></span><pre><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">data</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 09:39:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 09:39:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">已签收,感谢使用顺丰,期待再次为您服务</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 08:23:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 08:23:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">[北京市]北京海淀育新小区营业点派件员 顺丰速运 95338正在为您派件</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 07:32:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 07:32:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">快件到达 [北京海淀育新小区营业点]</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 02:03:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-10 02:03:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">快件在[北京顺义集散中心]已装车,准备发往 [北京海淀育新小区营业点]</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 23:05:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 23:05:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">快件到达 [北京顺义集散中心]</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 21:21:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 21:21:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">快件在[北京宝胜营业点]已装车,准备发往 [北京顺义集散中心]</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 13:07:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 13:07:00</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">顺丰速运 已收取快件</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 12:25:03</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 12:25:03</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">卖家发货</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 12:22:24</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-09 12:22:24</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">您的订单将由HLA（北京海淀区清河中街店）门店安排发货。</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">time</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-08 21:36:04</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">ftime</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">2018-05-08 21:36:04</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">context</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">商品已经下单</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;">      </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">location</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;">    </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">],</span></span>
<span class="line"><span style="color:#A6ACCD;">  </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">meta</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">status</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">200</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">message</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">获取物流信息成功！</span><span style="color:#89DDFF;">&quot;</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div></li></ul><h2 id="_1-11-数据统计" tabindex="-1">1.11. 数据统计 <a class="header-anchor" href="#_1-11-数据统计" aria-hidden="true">#</a></h2><h3 id="_1-11-1-基于时间统计的折线图" tabindex="-1">1.11.1. 基于时间统计的折线图 <a class="header-anchor" href="#_1-11-1-基于时间统计的折线图" aria-hidden="true">#</a></h3><ul><li><p>请求路径：reports/type/1</p></li><li><p>请求方法：get</p></li><li><p>响应数据</p></li><li><p>需要合并的选项</p><div class="language-js"><span class="copy"></span><pre><code><span class="line"><span style="color:#FFCB6B;">options</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#FFCB6B;">title</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">text</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">用户来源</span><span style="color:#89DDFF;">&#39;</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#FFCB6B;">tooltip</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">trigger</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">axis</span><span style="color:#89DDFF;">&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">axisPointer</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">            </span><span style="color:#FFCB6B;">type</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">cross</span><span style="color:#89DDFF;">&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">            </span><span style="color:#FFCB6B;">label</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">              </span><span style="color:#FFCB6B;">backgroundColor</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">#E9EEF3</span><span style="color:#89DDFF;">&#39;</span></span>
<span class="line"><span style="color:#F07178;">            </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#FFCB6B;">grid</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">left</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">3%</span><span style="color:#89DDFF;">&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">right</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">4%</span><span style="color:#89DDFF;">&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">bottom</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">3%</span><span style="color:#89DDFF;">&#39;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#FFCB6B;">containLabel</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#FF9CAC;">true</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#FFCB6B;">xAxis</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> [</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">            boundaryGap</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#FF9CAC;">false</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#F07178;">        ]</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#F07178;">        </span><span style="color:#FFCB6B;">yAxis</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> [</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;">            type</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&#39;</span><span style="color:#C3E88D;">value</span><span style="color:#89DDFF;">&#39;</span></span>
<span class="line"><span style="color:#F07178;">          </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#F07178;">        ]</span></span>
<span class="line"><span style="color:#F07178;">      </span><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div></li></ul></div></div></main><footer class="VPDocFooter" data-v-79ca2460 data-v-04568844><div class="edit-info" data-v-04568844><div class="edit-link" data-v-04568844><a class="VPLink link edit-link-button" href="https://github.com/" target="_blank" rel="noopener noreferrer" data-v-04568844 data-v-5704c677><!--[--><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="edit-link-icon" data-v-04568844><path d="M18,23H4c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h7c0.6,0,1,0.4,1,1s-0.4,1-1,1H4C3.4,5,3,5.4,3,6v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-7c0-0.6,0.4-1,1-1s1,0.4,1,1v7C21,21.7,19.7,23,18,23z"></path><path d="M8,17c-0.3,0-0.5-0.1-0.7-0.3C7,16.5,6.9,16.1,7,15.8l1-4c0-0.2,0.1-0.3,0.3-0.5l9.5-9.5c1.2-1.2,3.2-1.2,4.4,0c1.2,1.2,1.2,3.2,0,4.4l-9.5,9.5c-0.1,0.1-0.3,0.2-0.5,0.3l-4,1C8.2,17,8.1,17,8,17zM9.9,12.5l-0.5,2.1l2.1-0.5l9.3-9.3c0.4-0.4,0.4-1.1,0-1.6c-0.4-0.4-1.2-0.4-1.6,0l0,0L9.9,12.5z M18.5,2.5L18.5,2.5L18.5,2.5z"></path></svg> 欢迎前往GitHub帮助我们改善页面!<!--]--><!----></a></div><!----></div><div class="prev-next" data-v-04568844><div class="pager" data-v-04568844><a class="pager-link prev" href="/docs/%E7%AC%94%E8%AE%B0/Vuex%E8%BE%85%E5%8A%A9%E5%87%BD%E6%95%B0.html" data-v-04568844><span class="desc" data-v-04568844>Previous page</span><span class="title" data-v-04568844>Vuex辅助函数</span></a></div><div class="has-prev pager" data-v-04568844><!----></div></div></footer><!--[--><!--]--></div></div></div></div></div><footer class="VPFooter has-sidebar" data-v-6b5fd0a9 data-v-5b331722><div class="container" data-v-5b331722><p class="message" data-v-5b331722>Released under the MIT License.</p><p class="copyright" data-v-5b331722>Copyright © 2019-present Evan You</p></div></footer><!--[--><!--]--></div></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"css_a.md\":\"580a0d5e\",\"css_b.md\":\"559e9e64\",\"css_c.md\":\"74aa6b6b\",\"css_index.md\":\"0118c6c3\",\"html_a.md\":\"afa319bc\",\"html_b.md\":\"dc2ceded\",\"html_c.md\":\"3791ee3e\",\"html_index.md\":\"1e1121f9\",\"index.md\":\"4f276161\",\"javascript_a.md\":\"437e852e\",\"javascript_b.md\":\"028390c4\",\"javascript_c.md\":\"c54b9013\",\"javascript_index.md\":\"19b4519b\",\"关于_index.md\":\"8145426d\",\"指引_index.md\":\"3ae459a4\",\"笔记_api接口文档.md\":\"709394bf\",\"笔记_vuex辅助函数.md\":\"145b75a2\",\"笔记_index.md\":\"8dfe20dd\",\"笔记_新建vite项目.md\":\"fcd93c17\",\"笔记_防抖节流.md\":\"70c4d0a3\"}")</script>
    <script type="module" async src="/docs/assets/app.db96d06c.js"></script>
    
  </body>
</html>